//C04:FileClass.cpp {0}
// FileCalss Implementation.
#include <bits/types/FILE.h>
#include <cstdlib>
#include "FileClass.h"
#include <cstdio>
using namespace std;

FileClass::FileClass(const char* fname ,const char* mode) {
  if((f = fopen(fname, mode)) == 0) {
    throw FileClassError("Error opening file");
  }  
}

FileClass::~FileClass() { fclose(f); }
FILE* FileClass::fp() { return f; }